system_package(
    name = 'python3',
    package = 'python3'
)

system_package(
    name = 'zip',
    package = 'zip'
)

system_package(
    name = 'inotify',
    package = 'python3-pyinotify'
)

system_package(
    name = 'bsddb3',
    package = 'python3-bsddb3'
)

py_binary(
    name = 'ocean_pretty_graph_dump',
    src = 'pretty_graph_dump.py',
    deps = [
      '//dep_graph:cache_view',
      '//dep_graph:cache',
    ],
)

py_binary(
    name = 'ocean',
    src = 'build.py',
    deps = [
      ':repo_path',
      ':config',
      ':logsetup',
      ':gen_rules',
      ':u_complete_me',
      '//graph:run',
      '//graph:invalidate',
      '//graph:clean',
      '//build_file:graph',
      '//dep_graph:cache',
      '//watch_server:server_lock',
    ],
)

py_library(
    name = 'gen_rules',
    srcs = [
      'gen_rules.py',
    ]
)

py_library(
    name = 'logsetup',
    srcs = [
      'logsetup.py',
    ],
    deps = [
      '//formatters:formatters',
    ]
)

py_library(
    name = 'config',
    srcs = [
      'config.py',
    ],
    deps = [
      ':repo_path',
      '//dep_graph:cache',
      '//build_file:graph',
    ],
)

py_library(
    name = 'u_complete_me',
    srcs = [
      'u_complete_me.py',
    ]
)

py_library(
    name = 'repo_path',
    srcs = [
      'repo_path.py',
    ],
    deps = [
      '//dep_graph:keys',
    ],
)

py_test(
    name = 'repo_path_test',
    src = 'repo_path_test.py',
    deps = [
      ':repo_path'
    ],
)
